package springcloud.study.eurekaribbonclient;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@RestController
public class RibbonController {

    @Autowired
    private RibbonService ribbonService;

    @RequestMapping("/hi")
    public String hi(String name) {
        return ribbonService.hi(name);
    }

    @RequestMapping(value = "/getTest",method = RequestMethod.POST)
    public void test(@RequestParam("name") String name, @RequestParam("time") String time) {
        System.out.println(name+time);
    }

    @RequestMapping(value = "/test",method = RequestMethod.POST)
    public void test(@RequestBody Model model) {
        System.out.println(model.getName()+model.getTime());
    }
}
